package service.impl;

import dao.UserDao;
import dao.impl.UserDaoImp;
import entity.User;
import service.UserService;
import utils.Page;

import java.util.List;

public class UserServiceImp implements UserService {

    UserDao userDao = new UserDaoImp();

    @Override
    public List<User> getAll() {

        return userDao.getAll();
    }

    @Override
    public Integer deleteById(Integer id) {
        return userDao.deleteById(id);
    }

    @Override
    public Integer add(User user) {
        return userDao.add(user);
    }

    @Override
    public Integer updateById(User user) {
        return userDao.updateById(user);
    }

    @Override
    public User getById(Integer id) {
        return userDao.getById(id);
    }

    @Override
    public List<User> getPage(Page page,User user) {
        return userDao.getPage(page,user);
    }

    @Override
    public Integer count(User user) {
        return userDao.count(user);
    }
}
